.class public final Lcn/cheln/support/v4/pagerui/ViewPagerHelper;
.super Lcn/cheln/support/v4/pagerui/PagerHelper;


# instance fields
.field private c:Lcn/cheln/support/v4/view/PagerView;

.field private d:Lcn/cheln/support/v4/pagerui/ViewPagerHelper$MPagerAdapter;

.field private e:Ljava/util/ArrayList;

.field private f:Lcn/cheln/support/v4/pagerui/ViewPagerHelper$LoadPendingContentHandler;

.field private g:I

.field private h:I


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 0

    invoke-direct {p0, p1}, Lcn/cheln/support/v4/pagerui/PagerHelper;-><init>(Landroid/app/Activity;)V

    return-void
.end method

.method static synthetic a(Lcn/cheln/support/v4/pagerui/ViewPagerHelper;)Ljava/util/ArrayList;
    .locals 1

    iget-object v0, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->e:Ljava/util/ArrayList;

    return-object v0
.end method


# virtual methods
.method public final a()Lcn/cheln/support/v4/view/PagerView;
    .locals 2

    iget-object v0, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->c:Lcn/cheln/support/v4/view/PagerView;

    if-nez v0, :cond_0

    iget-object v0, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->b:Landroid/app/Activity;

    const v1, 0x7f08007b

    invoke-virtual {v0, v1}, Landroid/app/Activity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcn/cheln/support/v4/view/PagerView;

    iput-object v0, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->c:Lcn/cheln/support/v4/view/PagerView;

    :cond_0
    iget-object v0, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->c:Lcn/cheln/support/v4/view/PagerView;

    return-object v0
.end method

.method public final b()V
    .locals 2

    const/4 v1, 0x1

    iput v1, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->h:I

    iget-object v0, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->c:Lcn/cheln/support/v4/view/PagerView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->c:Lcn/cheln/support/v4/view/PagerView;

    invoke-virtual {v0, v1}, Lcn/cheln/support/v4/view/PagerView;->a(I)V

    :cond_0
    return-void
.end method

.method protected final b(Ljava/util/List;)V
    .locals 11

    const/4 v10, 0x0

    const/4 v9, 0x1

    const/4 v8, 0x0

    new-instance v1, Lcn/cheln/support/v4/pagerui/ViewPagerHelper$MPagerAdapter;

    iget-object v2, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->b:Landroid/app/Activity;

    invoke-virtual {p0}, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->a()Lcn/cheln/support/v4/view/PagerView;

    invoke-direct {v1}, Lcn/cheln/support/v4/pagerui/ViewPagerHelper$MPagerAdapter;-><init>()V

    iput-object v1, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->d:Lcn/cheln/support/v4/pagerui/ViewPagerHelper$MPagerAdapter;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    iput v1, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->g:I

    move v4, v8

    :goto_0
    iget v1, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->g:I

    if-ge v4, v1, :cond_5

    invoke-interface {p1, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcn/cheln/support/v4/pagerui/a;

    new-instance v5, Landroid/content/Intent;

    iget-object v2, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->b:Landroid/app/Activity;

    iget-object v3, v1, Lcn/cheln/support/v4/pagerui/a;->a:Ljava/lang/Class;

    invoke-direct {v5, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    iget-object v2, v1, Lcn/cheln/support/v4/pagerui/a;->b:Landroid/content/Intent;

    if-eqz v2, :cond_0

    iget-object v2, v1, Lcn/cheln/support/v4/pagerui/a;->b:Landroid/content/Intent;

    invoke-virtual {v2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v5, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    iget-object v2, v1, Lcn/cheln/support/v4/pagerui/a;->b:Landroid/content/Intent;

    invoke-virtual {v5, v2}, Landroid/content/Intent;->putExtras(Landroid/content/Intent;)Landroid/content/Intent;

    iget-object v2, v1, Lcn/cheln/support/v4/pagerui/a;->b:Landroid/content/Intent;

    invoke-virtual {v2}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v5, v2}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    :cond_0
    invoke-virtual {v5, v4}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    iget v6, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->h:I

    iget-object v2, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->a:Landroid/app/LocalActivityManager;

    invoke-virtual {v5}, Landroid/content/Intent;->getFlags()I

    move-result v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3, v5}, Landroid/app/LocalActivityManager;->startActivity(Ljava/lang/String;Landroid/content/Intent;)Landroid/view/Window;

    move-result-object v2

    if-eqz v2, :cond_3

    invoke-virtual {v2}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v2

    move-object v3, v2

    :goto_1
    if-eqz v3, :cond_2

    invoke-virtual {v3, v8}, Landroid/view/View;->setVisibility(I)V

    invoke-virtual {v3, v9}, Landroid/view/View;->setFocusableInTouchMode(Z)V

    move-object v0, v3

    check-cast v0, Landroid/view/ViewGroup;

    move-object v2, v0

    const/high16 v7, 0x4

    invoke-virtual {v2, v7}, Landroid/view/ViewGroup;->setDescendantFocusability(I)V

    invoke-virtual {v5}, Landroid/content/Intent;->getFlags()I

    move-result v5

    iget-object v2, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->a:Landroid/app/LocalActivityManager;

    invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v2, v7}, Landroid/app/LocalActivityManager;->getActivity(Ljava/lang/String;)Landroid/app/Activity;

    move-result-object v2

    if-eqz v2, :cond_2

    instance-of v7, v2, Lcn/cheln/support/v4/pagerui/b;

    if-eqz v7, :cond_2

    iget-object v7, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->e:Ljava/util/ArrayList;

    if-nez v7, :cond_1

    new-instance v7, Ljava/util/ArrayList;

    invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V

    iput-object v7, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->e:Ljava/util/ArrayList;

    :cond_1
    if-ne v5, v6, :cond_4

    iget-object v5, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->e:Ljava/util/ArrayList;

    check-cast v2, Lcn/cheln/support/v4/pagerui/b;

    invoke-virtual {v5, v8, v2}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V

    :cond_2
    :goto_2
    invoke-virtual {v3, v9}, Landroid/view/View;->setId(I)V

    iget-object v2, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->d:Lcn/cheln/support/v4/pagerui/ViewPagerHelper$MPagerAdapter;

    iget-object v1, v1, Lcn/cheln/support/v4/pagerui/a;->a:Ljava/lang/Class;

    invoke-virtual {v2, v3}, Lcn/cheln/support/v4/pagerui/ViewPagerHelper$MPagerAdapter;->a(Landroid/view/View;)V

    add-int/lit8 v1, v4, 0x1

    move v4, v1

    goto/16 :goto_0

    :cond_3
    move-object v3, v10

    goto :goto_1

    :cond_4
    iget-object v5, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->e:Ljava/util/ArrayList;

    check-cast v2, Lcn/cheln/support/v4/pagerui/b;

    invoke-virtual {v5, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_2

    :cond_5
    const-string v1, "--- -111 "

    invoke-static {v1}, Lcn/cheln/support/app/c;->a(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->a()Lcn/cheln/support/v4/view/PagerView;

    move-result-object v1

    iget-object v2, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->d:Lcn/cheln/support/v4/pagerui/ViewPagerHelper$MPagerAdapter;

    invoke-virtual {v1, v2}, Lcn/cheln/support/v4/view/PagerView;->a(Lcn/cheln/support/v4/view/g;)V

    const-string v1, "--- -222 "

    invoke-static {v1}, Lcn/cheln/support/app/c;->a(Ljava/lang/String;)V

    iget-object v1, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->e:Ljava/util/ArrayList;

    if-eqz v1, :cond_6

    new-instance v1, Lcn/cheln/support/v4/pagerui/ViewPagerHelper$LoadPendingContentHandler;

    invoke-direct {v1, p0, v10}, Lcn/cheln/support/v4/pagerui/ViewPagerHelper$LoadPendingContentHandler;-><init>(Lcn/cheln/support/v4/pagerui/ViewPagerHelper;Lcn/cheln/support/v4/pagerui/c;)V

    iput-object v1, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->f:Lcn/cheln/support/v4/pagerui/ViewPagerHelper$LoadPendingContentHandler;

    iget-object v1, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->f:Lcn/cheln/support/v4/pagerui/ViewPagerHelper$LoadPendingContentHandler;

    invoke-virtual {v1}, Lcn/cheln/support/v4/pagerui/ViewPagerHelper$LoadPendingContentHandler;->obtainMessage()Landroid/os/Message;

    move-result-object v1

    const/4 v2, -0x1

    iput v2, v1, Landroid/os/Message;->arg1:I

    iget-object v2, p0, Lcn/cheln/support/v4/pagerui/ViewPagerHelper;->f:Lcn/cheln/support/v4/pagerui/ViewPagerHelper$LoadPendingContentHandler;

    const-wide/16 v3, 0x64

    invoke-virtual {v2, v1, v3, v4}, Lcn/cheln/support/v4/pagerui/ViewPagerHelper$LoadPendingContentHandler;->sendMessageDelayed(Landroid/os/Message;J)Z

    :cond_6
    return-void
.end method
